home *** CD-ROM | disk | FTP | other *** search
- Path: darkstar.UCSC.EDU!moth
- From: moth@cse.ucsc.edu (Moth)
- Newsgroups: comp.lang.c
- Subject: Re: microsecond delay
- Date: 29 Mar 1996 13:22:57 GMT
- Organization: UC Santa Cruz CIS/CE
- Message-ID: <4jgo7h$n7i@darkstar.UCSC.EDU>
- References: <14546@828046609>
- NNTP-Posting-Host: arapaho.cse.ucsc.edu
-
- In article <14546@828046609>, dan j <djacobso@cs.indiana.edu> wrote:
- >We are writing a program that reads bar codes swiped on a card reader.
- >
- >The problem is that when we write to the device on the serial line,
- >the following read is too fast for the device. We have to delay the
- >read briefly. We can use "sleep" to delay a second, but that's too
- >long.
- >
- >Is there any way effect delays in miliseconds without resorting to
- >loops?
-
- void usleep(unsigned long usec);
-
-
- --
- --=--=--=--=--=--=-\--=--=--=--=--=--=--=--=--=--=--=--=-\
- \ Jeff Edgett \ "To whom the mornings stand for \
- / ]\/[ {=} '|` ]-[ \ nights what must the midnights be!"\
- \_moth@cse.ucsc.edu___\____-Emily Dickenson_________________\
-